import React                        from 'react';
import {render}                     from 'react-dom';
import {Router}                     from 'react-router-dom';
import {Provider}                   from 'react-redux';

import '../style';
import routes                       from './containers/routes';
import configStore                  from './store/configureStore';
import {subRoutes}                  from './config/Navigator';
import hashHistory                  from './utils/history';

const store = configStore();

render(
    <Provider store={store}>
        <Router history={hashHistory}>
            <React.Fragment>{subRoutes(routes)}</React.Fragment>
        </Router>
    </Provider>,
    document.getElementById('root')
);
